Communication between WCF service [library] and Self-host [Winform]
Posted
by
Mur Haf Soz
on Programmers
See other posts from Programmers
or by Mur Haf Soz
Published on 2012-05-07T05:32:15Z
Indexed on
2012/06/06
16:49 UTC
Read the original article
Hit count: 375
Introduction:
I have a WCF service library and a self-host Winform.
Service features is File explorer including (copy, move, delete, new folder, delete... etc) and Task Manager (run, kill, update list).
Then now I want to add other features like chatting between self-host and client, send an image from client to self-host so when it received, it is shown in a pictureBox in a new form.
Till now I have two endpoints for (Task Manager, File Manager) that runs under one service "MainService".
And I set up all the connections using DotNet 4.0 WCF Configuration and Wizards, and I'm using netTcpBinding.
Problem:
I need to know how to communicate with between WCF service lib and self-host, so I can append a received chat from client on self-host form's textbox TextBoxChat
.
And also call a client callback from self-host when Send button clicked, to send the message from self-host textbox TextBoxMessage
. Let's say this's self-host ChatForm
So is it possible to do that in WCF? I would prefer to run ChatEndpoint under MainService, so all Endpoints use one port.
© Programmers or respective owner